Feature: Testing login page of demo.relenta.com

    Scenario: without SSL connection
    Given navigate to the page "http://demo.relenta.com/"
    When on the page exists following text:"© 2010 Relenta Inc. All rights reserved."
    When "text_field" component with "id"="username" avaliable
    Then type "demo" value in text field with "id"="username"
    When "text_field" component with "id"="password" avaliable
    Then type "demo" value in text field with "id"="password"
    When "button" component with "id"="password" avaliable
    Then click button with "value"="Login"
    When no message appears in text_field with "id"="error-message"
    Then wait till page load
    When on the page exists following text:"Email marketing"
    Then logoff clicking on link with "xpath"="/html/body/div/div/div/div/a[3]"
    When on the page exists following text:"© 2010 Relenta Inc. All rights reserved."

    Scenario: with SSL connection
    Given navigate to the page "https://demo.relenta.com/"
    When on the page exists following text:"© 2010 Relenta Inc. All rights reserved."
    When "text_field" component with "id"="username" avaliable
    Then type "demo" value in text field with "id"="username"
    When "text_field" component with "id"="password" avaliable
    Then type "demo" value in text field with "id"="password"
    When "button" component with "id"="password" avaliable
    Then click button with "value"="Login"
    When no message appears in text_field with "id"="error-message"
    Then wait till page load
    When on the page exists following text:"Email marketing"
    Then logoff clicking on link with "xpath"="/html/body/div/div/div/div/a[3]"
    When on the page exists following text:"© 2010 Relenta Inc. All rights reserved."